import java.math.BigInteger;

public class Solution1 {

    public static String solve (String str1, String str2) {
        // write code here

        BigInteger b1 = new BigInteger(str1, 2);
        BigInteger b2 = new BigInteger(str2, 2);

        BigInteger result = b1.add(b2);
        byte[] bytes = result.toByteArray();
        for (byte b : bytes) {
            System.out.print(b + " ");
        }
        String s3 = new String(result.toByteArray());
        return s3;
    }

    public static void main(String[] args) {
        String s1 = "1101";
        String s2 = "1100";

        String result = solve(s1,s2);
        System.out.println(result);
    }
}
